var checkedBoxes = new Array();
var unCheckBoxes = new Array();
var arrLength = checkedBoxes.length;

$().ready(function(){
	arrLength = checkedBoxes.length;
});

function caculator(value){
	arrLength = checkedBoxes.length;
	
	$(":checkbox").each(function(){		
		if($(this).is(":checked")){
			if($.inArray($(this).attr('id'), checkedBoxes)){
				checkedBoxes[arrLength] = $(this).attr('id');				
			}
		}
		
				
	});
	
	/*getUncheckedBoxes();
		
	checkedBoxes = $.grep(checkedBoxes, function(value){
			for(var i=0, n=unCheckBoxes.length; i<n; i++){
				return value != unCheckBoxes[i];
			}
	});
	
	alert(checkedBoxes.length);*/
	/*var text = ""
	for(var i=0, n=checkedBoxes.length; i<n; i++){
		text +=checkedBoxes[i]+", ";
		$("div #test").text(text);
	}*/
	
}

function getUncheckedBoxes(){
	var unChecked = 0;
	var arrUnCheckedBoxes = new Array();
	
	var t = "";
	$(":checkbox").each(function(){
		if(!$(this).is(":checked")){
			arrUnCheckedBoxes[unChecked] = $(this).attr('id');			
			unChecked++;
			t += $(this).attr('id') + ", ";
			$("#test").text(t);
		}			
	});	
	
	unCheckBoxes = arrUnCheckedBoxes;
	//return arrUnCheckedBoxes.length;
}


function getAllCheckedBoxes(){
	var length = $("input:checked").length;
	//alert(length);
	
	
}

function daysInMonth(iMonth, iYear){
	return 32 - new Date(iYear, iMonth, 32).getDate();
}
